int i;
float[ ] p1, p2;

void setup() {
  p1 = new float[3];
  p2 = new float[3];
  
  background(0);
  stroke(255);
  strokeWeight(5);
  fill(128);
  
  frameRate(2);
}

void draw() {
  background(0);
  
  triangle ( 
  p1[0]*width, p2[0]*height, 
  p1[1]*width, p2[1]*height, 
  p1[2]*width, p2[2]*height 
    );   
    
  for( i=0 ; i<3 ; i++ ){
    p1[i] = random(0,1);
    p2[i] = random(0,1);
  }
}

